package com.enfi.api.modules.db.entity;

import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;




/**
 * 预警內容浏览表(WarningView)实体类
 *
 * @author wind
 * @since 2020-04-07 15:56:42
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="t_tbl_warning_view")
@EntityListeners(AuditingEntityListener.class)
@DynamicInsert
@DynamicUpdate
public class WarningView implements Serializable {

    private static final long serialVersionUID = 1L;

    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

    /**
     * 预警ID
     */    
    private Integer warningId;

    /**
     * 用户ID
     */    
    private String userId;

    /**
     * 用户名称
     */    
    private String userName;

    /**
     * 浏览时间
     */    
    private Date viewTime;

    /**
     * 查看状态 0未读 1已读
     */    
    private Integer viewStatus;

    /**
     * 确认状态 0未确认 1已确认
     */    
    private Integer confirmStatus;

    @CreatedDate
    private Date createTime;

    @LastModifiedDate
    private Date updateTime;

        
    private Integer workorderId;

    @Transient
    private String post;
    @Transient
    private String postName;
}